package com.sam.im.heiqun.uis.adapters.holder;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewStub;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.sam.im.heiqun.R;
import com.yuyh.library.view.image.CircleImageView;

/**
 * Created by leijiawen on 2017/6/19.
 */
public abstract class ColactionBaseViewHolder extends RecyclerView.ViewHolder {
    public static  int TYPE_TEXT = 1 ;
    public static  int TYPE_IMG = 2 ;
    public static  int TYPE_VOICE = 3 ;
    public static  int TYPE_VIDEO = 4 ;
    public static  int TYPE_EMOJI = 5 ;
    public static  int TYPE_URL = 6 ;

    public LinearLayout backlayout ;
    public CircleImageView headIcon ;
    public TextView tvTime ;
    public TextView fromName ;
    public int viewType  ;
    public View dividerview ;
    public ColactionBaseViewHolder(View itemView,int viewType) {
        super(itemView);
        this.viewType = viewType;
        ViewStub viewStub = (ViewStub) itemView.findViewById(R.id.view);
        initSubView(viewType, viewStub);
        backlayout = (LinearLayout) itemView.findViewById(R.id.backlayout);
        headIcon = (CircleImageView) itemView.findViewById(R.id.img_head);
        tvTime = (TextView) itemView.findViewById(R.id.tv_time);
        fromName = (TextView) itemView.findViewById(R.id.tv_fromname);
        dividerview = itemView.findViewById(R.id.divider_view);

    }
    public abstract void initSubView(int viewType, ViewStub viewStub);
}
